﻿#ifndef TOOLS_H
#define TOOLS_H

#include "YToolWidget.h"
#include <QPushButton>

namespace Ui {
class Tools;
}
// add by liq 12
class CToolTip;

class Tools : public YToolWidget
{
    Q_OBJECT

public:
    explicit Tools(QWidget *parent = nullptr);
    ~Tools();
    void setTack();

signals:
    void draw(int type);//绘画
    void undo();
    void redo();
    void tack();//钉住
    void record();//录制
    void download();//下载
    void clipBoard();//下载
    void finished();//完成退出
    // add by liq 12
    void sigClose();
    // add by liq 14
    void sigSaveImageToClipboard();
    void sigScreenshotCancel();
    void sigShiftKeyPressed(bool);
    void sigDoUndoAction();
    void sigDoRedoAction();

public slots:
    void onUpdateToolSetting(int itemType);
    void onUpdateUndoBtnState(bool canUndo);
    void onUpdateRedoBtnState(bool canRedo);

private:
    Ui::Tools *ui;
    // add by liq 12
    CToolTip* g_toolTip = nullptr;
    void updatePushBtnStyle(QPushButton *pushBtn, bool enabled);

// add by liq 12
protected:
//    void mouseMoveEvent(QMouseEvent* event);
    bool eventFilter(QObject* object, QEvent* event);
    virtual void keyPressEvent(QKeyEvent *e);
};

#endif // TOOLS_H
